import java.io.File;
import java.io.IOException;
import java.util.Arrays;

public class Test {

    public static void main(String[] args) throws IOException {
       File file=new File("./testDir/bbb/ccc");
       File file1=new File("./testDir/bbb/eee");
       file.renameTo(file1);
    }
    public static void main4(String[] args) {
        File file=new File("./testDir/aaa/bbb");
        file.mkdirs();
    }
    public static void main3(String[] args) throws IOException {
        File file=new File("./ccc" );
        file.createNewFile();
        System.out.println(file.exists());
        System.out.println(file.isFile());
        System.out.println(file.isDirectory());

    }
    public static void main2(String[] args) throws IOException {
        File file=new File("./test.txt");
        System.out.println(file.getParent());
        System.out.println(file.getName());
        System.out.println(file.getPath());
        System.out.println(file.getAbsoluteFile());
        System.out.println(file.getCanonicalFile());
    }
    public static void main1(String[] args) throws IOException {
        File file=new File("D:/test.txt");
        System.out.println(file.getParent());
        System.out.println(file.getName());
        System.out.println(file.getPath());
        System.out.println(file.getAbsoluteFile());
        System.out.println(file.getCanonicalFile());

    }
}
